package com.lson.kafka.stream;

import com.alibaba.fastjson.JSON;
import lombok.extern.slf4j.Slf4j;
//import org.springframework.cloud.stream.annotation.EnableBinding;
//import org.springframework.cloud.stream.annotation.StreamListener;
//import org.springframework.cloud.stream.messaging.Sink;

import java.util.concurrent.atomic.AtomicInteger;


@Slf4j
//@EnableBinding(Sink.class)
public class ConsumerListener {
    AtomicInteger count = new AtomicInteger();
//    @StreamListener(Sink.INPUT)
    public void onProductMsg(){
//        System.out.println(JSON.toJSONString(productMsg));
//        System.out.println(999);
        if(count.incrementAndGet()%10000==0){
            log.info(count.intValue()+"");
        }
    }
}
